#include "I2C_Hard.h"
#include "Mpu6050_I2C_HARD.h"
#include "stm32f10x.h"

int Sensors_I2C_ReadRegister(unsigned char Address, 
                            unsigned char RegisterAddr, 
                            unsigned short RegisterLen, 
                                unsigned char *RegisterValue){
                                          
                                          
    read_n_bytes(RegisterAddr,RegisterValue,RegisterLen);                        
    return 0;                                      
}
                                

int Sensors_I2C_WriteRegister(unsigned char Address, 
                            unsigned char RegisterAddr, 
                               unsigned short RegisterLen,
                             const unsigned char *RegisterValue){
    uint8_t data[RegisterLen+1];
    data[0] = RegisterAddr;
    for(uint8_t i=0;i<RegisterLen;i++){
        data[i+1] = RegisterValue[i];
    }                                
    send_n_byte(Address,data,RegisterLen+1);

    return 0;
}
